/**
 * Created by Dave on 2017/3/7.
 */
!function() {
    function b() {
        var b = document.documentElement.clientHeight || document.body.clientHeight
            , f = document.documentElement.scrollTop || document.body.scrollTop
            , u = $(".benefits-container").children(".block");
        return d || a || e ? ($(".derc-box").each(function(a, b) {
                $(b).css({
                    opacity: 1,
                    transform: "translateY(0)",
                    transition: "none"
                })
            }),
                $(".img-wrap").each(function(a, b) {
                    $(b).css({
                        opacity: 1,
                        transform: "translateY(0)",
                        transition: "none"
                    })
                }),
                !1) : void u.each(function(a, d) {
                var e = $(d);
                f > e.offset().top - b + 100 && (e.find(".derc-box").addClass("pop-up"),
                    e.find(".img-wrap").addClass("pop-up"))
            })
    }
    var f = navigator.userAgent
        , d = f.match(/(Android)\s+([\d.]+)/)
        , a = !f.match(/(iPad).*OS\s([\d_]+)/) && f.match(/(iPhone\sOS)\s([\d_]+)/)
        , e = f.match(/(Windows\sPhone)\s([\d_]+)/);
    (-1 != navigator.userAgent.indexOf("MSIE") || "Microsoft Internet Explorer" == navigator.appName || window.ActiveXObject) && (navigator.appVersion.match(/8./i),
        navigator.appVersion.match(/9./i));
    $(document).ready(function() {
        window.addEventListener ? window.addEventListener("scroll", b, !1) : window.attachEvent("onscroll", b);
        $("div.top").height();
        document.getElementById("home_video")
    })
}();